package org.itboys.trade.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;
/**
 * 购物车
 * @author weisky
 *
 */
@Entity(value = "Cart", noClassnameStored = true)
public class Cart extends BaseLongIdEntity{

	private static final long serialVersionUID = 7538000568591269662L;
	
	@Indexed
	private Long memberId;
	private String cookie;//登陆后用session交换cookie  没有登陆时存cookie
	private Long productId;
	private Integer price = 0; //购物车商品原价总和
	private Integer fee = 0; //购物车项目最终报价总和
	private Integer num = 0;//商品数量
	private String elements; //下单的一些规格 尺码之类的描述信息
	private Long specDetailId; //规格id
	
	public Long getMemberId() {
		return memberId;
	}
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}
	public String getCookie() {
		return cookie;
	}
	public void setCookie(String cookie) {
		this.cookie = cookie;
	}
	public Long getProductId() {
		return productId;
	}
	public void setProductId(Long productId) {
		this.productId = productId;
	}
	public Integer getPrice() {
		return price;
	}
	public void setPrice(Integer price) {
		this.price = price;
	}
	public Integer getFee() {
		return fee;
	}
	public void setFee(Integer fee) {
		this.fee = fee;
	}
	public Integer getNum() {
		return num;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	public String getElements() {
		return elements;
	}
	public void setElements(String elements) {
		this.elements = elements;
	}
	public Long getSpecDetailId() {
		return specDetailId;
	}
	public void setSpecDetailId(Long specDetailId) {
		this.specDetailId = specDetailId;
	}
	
}
